﻿using University.Workshop.DataAccess;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace University.Workshop.Tests
{
    
    
    /// <summary>
    ///This is a test class for UserTest and is intended
    ///to contain all UserTest Unit Tests
    ///</summary>
    [TestClass()]
    public class UserTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 1;
            string actual;
            actual = target.GetLevel;
            string expected = "Beginner";
            Assert.AreEqual(actual,expected);

        }

        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest1()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 2;
            string actual;
            actual = target.GetLevel;
            string expected = "Cowboy";
            Assert.AreEqual(actual, expected);

        }

        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest2()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 3;
            string actual;
            actual = target.GetLevel;
            string expected = "Hero";
            Assert.AreEqual(actual, expected);

        }

        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest3()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 4;
            string actual;
            actual = target.GetLevel;
            string expected = "Master";
            Assert.AreEqual(actual, expected);

        }

        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest4()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 5;
            string actual;
            actual = target.GetLevel;
            string expected = "Expert";
            Assert.AreEqual(actual, expected);

        }

        /// <summary>
        ///A test for GetLevel
        ///</summary>
        [TestMethod()]
        public void GetLevelTest5()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            target.UserLevel = 6;
            string actual;
            actual = target.GetLevel;
            string expected = "Genius";
            Assert.AreEqual(actual, expected);

        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 1; // TODO: Initialize to an appropriate value
            string expected = "Beginner"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest1()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 2; // TODO: Initialize to an appropriate value
            string expected = "Cowboy"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest2()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 3; // TODO: Initialize to an appropriate value
            string expected = "Hero"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest3()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 4; // TODO: Initialize to an appropriate value
            string expected = "Master"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest4()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 5; // TODO: Initialize to an appropriate value
            string expected = "Expert"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///A test for GetLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetLevelFromOtherTest5()
        {
            User target = new User(); // TODO: Initialize to an appropriate value
            int index = 6; // TODO: Initialize to an appropriate value
            string expected = "Genius"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.GetLevelFromOther(index);
            Assert.AreEqual(expected, actual);

        }

        /// <summary>
        ///Una prueba de GetUserLevelFromOther
        ///</summary>
        [TestMethod()]
        public void GetUserLevelFromOtherTest()
        {
            User target = new User(); // TODO: Inicializar en un valor adecuado
            string index = "Genius"; // TODO: Inicializar en un valor adecuado
            int expected = 6; // TODO: Inicializar en un valor adecuado
            int actual;
            actual = target.GetUserLevelFromOther(index);
            Assert.AreEqual(expected, actual);
        }
    }
}
